{% extends 'backend_loyout.html' %}
{% block title %}{{ obj.title }}{% endblock %}
{% block css %}
    <style>
        .trouble-title {
            width: 100%;
            height: 48px;
            list-style: none;
            line-height: 48px;
        }

        .trouble-title li {
            display: inline-block;
            margin-right: 5px;
        }

        .trouble-body {
            padding: 0px 30px;
            margin-bottom: 50px;
        }

        .trouble-body .title {
            width: 100%;
            height: 50px;
            text-align: center;
        }

        .trouble-body .detail {
            width: 100%;
            text-align: center;
        }

        .ask-about {
            width: 100%;
            height: 50px;
            text-align: center;
        }

        .solution, .processor, .time, .evaluate {
            width: 600px;
            margin: 0 auto;
        }
    </style>
{% endblock %}

{% block content %}
    <ul class="trouble-title">
        <li style="color: #2aabd2">报障管理</li>
        <li><i class="fa fa-arrow-right" style="margin-right: 5px;"></i>报障单详情</li>
    </ul>
    <div class="trouble-body container">
        <div class="title">
            <h3>{{ obj.title }}</h3>
        </div>
        <div class="ask-about">
            <span>{{ obj.user.nickname }}</span>
            <span>{{ obj.ctime }}</span>
            <span>{{ obj.get_status_display }}</span>
        </div>
        <div class="detail">
            <p>概述：{{ obj.detail|safe }}</p>
        </div>
        {% if obj.status != 1 %}
            <div class="processor">
                处理者：{{ obj.processor.nickname }}</div>
            <div class="time">
                {% if obj.status == 2 %}
                    接单时间: {{ obj.ctime }}
                    <div class="solution">
                        解决方法：处理中
                    </div>
                {% else %}
                    处理时间：{{ obj.ctime }}
                    </div>
                    <div class="solution">
                        解决方法：{{ obj.solution|safe }}
                    </div>
                {% endif %}
        {% endif %}
        {% if obj.evaluate %}
            <div class="evaluate">
                评分： {{ obj.get_evaluate_display }}
            </div>
        {% endif %}
    </div>
{% endblock %}

{% block js %}
    <script charset="utf-8" src="/static/plugins/kingeditor/kindeditor-all-min.js"></script>
    <script charset="utf-8" src="/static/plugins/kingeditor/lang/zh-CN.js"></script>
{% endblock %}